﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var auditData = Jxstar.findComboData('audit');
	var checkresultData = Jxstar.findComboData('checkresult');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'trigger', fieldLabel:'供应商编号', name:'provider_check__provider_code',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:20, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'provider_select', layoutPage:'', sourceField:'provider.provider_code;provider_name;provider_id', targetField:'provider_check.provider_code;provider_name;provider_id', whereSql:"manage_status = '20' and auditing = '1'", whereValue:'', whereType:'', isSame:'0', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'provider_check.provider_code'};
							JxSelect.createSelectWin(selcfg, this, 'node_provider_check_form');
						}},
					{xtype:'textfield', fieldLabel:'供应商名称', name:'provider_check__provider_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'评审人', name:'provider_check__user_name', defaultval:'fun_getUserName()', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'评审部门', name:'provider_check__dept_name', defaultval:'fun_getDeptName()', readOnly:true, anchor:'100%', maxLength:25},
					{xtype:'hidden', fieldLabel:'评审部门id', name:'provider_check__dept_id', defaultval:'fun_getDeptId()', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主键', name:'provider_check__check_id', anchor:'100%'}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'provider_check__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'textfield', fieldLabel:'评审年度', name:'provider_check__check_year', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:20},
					{xtype:'combo', fieldLabel:'评审结果', name:'provider_check__check_result', defaultval:'0',
						anchor:'100%', editable:false, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*',
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: checkresultData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: checkresultData[0][0]},
					{xtype:'datefield', fieldLabel:'评审日期', name:'provider_check__check_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'供应商ID', name:'provider_check__provider_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'评审人id', name:'provider_check__user_id', defaultval:'fun_getUserId()', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'评审批注', name:'provider_check__check_content', width:'100%', height:48, maxLength:200},
					{xtype:'textarea', fieldLabel:'备注', name:'provider_check__memo', width:'100%', height:48, maxLength:200}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'provider_check'
	};

	
	
	return new Jxstar.FormNode(config);
}